/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.core.image.entity.TextImage
   Module Description   :

   Date Created      : 2009/12/8
   Original Author   : jeff.ma
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.core.image.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.persistence.Version;

import org.hibernate.annotations.GenericGenerator;

/**
 * @author jeff.ma
 * 
 */
@Entity
@Table(name = "COMM_IMAGE_CHECK")
public class TextImage implements Serializable {

	/** serialVersionUID */
	private static final long serialVersionUID = -7693842596133778679L;
	@Id
	@GeneratedValue(generator = "gen_uuid")
	@GenericGenerator(name = "gen_uuid", strategy = "uuid")
	@Column(name = "IMG_UUID", length = 32)
	private String uuid;
	@Transient
	private byte[] body;
	@Transient
	private String type = "JPG";
	@Transient
	private int width = 300;
	@Transient
	private int height = 100;
	@Column(name = "IMG_TEXT", length = 30)
	private String text = null;
	@Version
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "MODIFY_DATE")
	private Date modifyDate;

	/** default constructor */
	public TextImage() {
	}

	/** default constructor */
	public TextImage(String text) {
		this.text = text;
	}

	/** default constructor */
	public TextImage(String text, int wight, int high) {
		this.width = wight;
		this.height = high;
		this.text = text;
	}

	/** default constructor */
	public TextImage(int wight, int high) {
		this.width = wight;
		this.height = high;
	}

	/**
	 * @return the uuid
	 */
	public String getUuid() {
		return uuid;
	}

	/**
	 * @param uuid the uuid to set
	 */
	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	/**
	 * @return the body
	 */
	public byte[] getBody() {
		return body;
	}

	/**
	 * @param body the body to set
	 */
	public void setBody(byte[] body) {
		this.body = body;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the wight
	 */
	public int getWight() {
		return width;
	}

	/**
	 * @param wight the wight to set
	 */
	public void setWight(int wight) {
		this.width = wight;
	}

	/**
	 * @return the high
	 */
	public int getHigh() {
		return height;
	}

	/**
	 * @param high the high to set
	 */
	public void setHeight(int high) {
		this.height = high;
	}

	/**
	 * @return the text
	 */
	public String getText() {
		return text;
	}

	/**
	 * @param text the text to set
	 */
	public void setText(String text) {
		this.text = text;
	}

	/**
	 * @return the modifyDate
	 */
	public Date getModifyDate() {
		return modifyDate;
	}

	/**
	 * @param modifyDate the modifyDate to set
	 */
	public void setModifyDate(Date modifyDate) {
		this.modifyDate = modifyDate;
	}

}
